package com.meepo.basic.components

import android.content.Context
import com.lxj.xpopup.XPopup
import com.lxj.xpopup.impl.LoadingPopupView

object AlertPopup {

    fun popup(context: Context, text: String) {
        val errorPopup = XPopup.Builder(context)
            .dismissOnBackPressed(false)
            .dismissOnTouchOutside(false)
            .asLoading(text)
            .show() as LoadingPopupView

        errorPopup.postDelayed({ errorPopup.dismiss() }, 1500)
    }
}